1. Field of the Invention
The present invention relates to a software system including a plurality of program modules.
2. Description of the Related Art
In known software systems including a plurality of program modules, some systems have start order control means that controls the order of starting the program modules at system start-up time (refer to, for example, Japanese Patent Laid-Open No. 2002-196939, Japanese Patent Laid-Open No. 2002-297403, Japanese Patent Laid-Open No. 2002-351677, and “OSGi Service Platform Release 3”, Open Service Gateway Initiative, March 2003).
In general, the purpose of controlling the start order is to satisfy dependency relationships among program modules so that, when some program module uses a function provided by a different program module, the program module that provides a function is started first to avoid the failure of the start-up of the program module that uses the function.
In embedded devices, at power-on time an initialization program is started so as to start up programs required for system operation and initialize these programs.
In known embedded devices, in many cases at power-off time, execution of the programs forcibly terminates by turning off a power switch and shutting off electric power.
If electric power is forcibly shut off, data that is stored in a volatile memory, such as a dynamic RAM (random access memory), and that is not stored in a non-volatile memory, such as a static RAM and a hard disk, is lost. Additionally, in a system including a hard disk, the hard disk may suffer physical damage or loss of stored data due to loss of power during writing data onto the hard disk.
To prevent this situation, some embedded devices carry out a system stopping operation known as a shutdown operation so that a process being carried out by a program module is safely terminated or data stored only in a volatile memory is transferred to a non-volatile memory.
However, if, as in a start-up operation, a program module uses a function provided by a different program module during the shutdown operation and if the program module that provides the function terminates first, the program module that uses the function is not able to terminate normally. That is, the termination process fails, which is a problem.
In the method disclosed in Japanese Patent Laid-Open No. 2002-196939, in order to start or terminate a program module added to a system while the system is running, a definition file that defines the order of starting and termination needs to be re-written every time a program module is added, which is also a problem.